//
//  ScreenShotsView.swift
//  macOS截屏
//
//  Created by apple on 2021/6/16.
//

import SwiftUI

class ScrernShotsView: NSView {

    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func draw(_ dirtyRect: NSRect) {
        super.draw(dirtyRect)
        NSColor.blue.setFill()
    }
    
    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)
    }
    
    override func mouseDown(with event: NSEvent) {
        self.saveSelfAsImage()
    }
}

